package com.cdu.controller;


import com.cdu.model.common.BaseResponse;
import com.cdu.model.query.LogQurey;
import com.cdu.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author chengjiang@jasonch.tech
 * @since 2022-05-10
 */
@RestController
@RequestMapping("/sysLog")
@Api(value = "log", tags = "log - controller")
@Slf4j
@RequiredArgsConstructor
public class SysLogController {

    private final SysLogService logService;
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", name = "Authentication", required = true),
    })
    @GetMapping("/query")
    @ApiOperation("查询日志接口")
    public BaseResponse page(LogQurey logQurey) {
        return logService.queryAllLogs(logQurey);
    }

}

